package com.paradogs.generator;

import com.paradogs.generator.utils.GeneratorUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.nio.file.Paths;

/**
 * @author: yumi
 * @date: 2023/11/18  10:23
 * @Description: protobuf 文件生成器，通过 java 实体类生成 .proto 文件
 */
@SpringBootApplication
public class ProtobufIDLGenerator {
    public static void main(String[] args) {
        SpringApplication.run(ProtobufIDLGenerator.class, args);
        String outDir = Paths.get(System.getProperty("user.dir"), "proto").toString();
        String[] scanPackages = new String[]{"com.paradogs"};
        GeneratorUtils.generatorIDL(outDir, scanPackages);
    }
}
